[JEWEL-1277] Add FrontMatter metadata block support for Markdown#3454
Open
AlexVanGogen wants to merge 1 commit intoJetBrains:masterfrom
Open
[JEWEL-1277] Add FrontMatter metadata block support for Markdown#3454AlexVanGogen wants to merge 1 commit intoJetBrains:masterfrom
AlexVanGogen wants to merge 1 commit intoJetBrains:masterfrom
Conversation
5cff30b to
48efc38
Compare
8aea4d1 to
bc78700
Compare
d2ef681 to
169af6d
Compare
169af6d to
65f19df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for YAML front matter metadata blocks in Jewel's Markdown rendering. Front matter content (delimited by
---markers at the beginning of a file) is parsed and rendered as a table where keys form the first column and values form the second column. It differs from other renderers that prefer using rows (likely because then the keys will render in bold), but it helps keeping all the information in a Markdown file readable without coming down to horizontal scrolling.Multi-value (list) entries are rendered as Markdown lists (opposite to one-row tables in other renderers), again, to keep the vertical structure of the block.
Fixes JEWEL-1277
Changes
front-matterextension module (intellij.platform.jewel.markdown.extensions.frontMatter) with aFrontMatterProcessorExtensionthat integrates with Jewel's Markdown processor pipelineFrontMatterBlockParser) supporting plain key-value pairs, YAML lists, quoted strings, and block scalars (literal|and folded>with all chomping indicators)gfm-tablesTable model classes (TableBlock,TableCell,TableHeader,TableRow) frominternaltopublicexperimental API to allow reuse by front matter renderingTableBlock.headerto nullable (TableHeader?) to support headerless tables (used for nested value tables)TableCell.contentfromList<InlineMarkdown>toMarkdownBlockto support block-level content in cells (e.g., nested tables)GitHubTableBlockRendererto render block content in cells viaRenderBlockinstead ofRenderParagraphDemo
Tested scenarios
Typing in
Screen.Recording.2026-03-09.at.18.58.35.mov
Release notes
New features